﻿
using System.Collections.Generic;
using Library.OrmEnterpriseEntity.TableInfo;
using System.Text;

namespace Library.OrmEnterpriseEntity {
	public sealed class UpdateStatementWrapper : StatementWrapper {
		private readonly UpdateQueryStatement _update;
		internal UpdateStatementWrapper(UpdateQueryStatement updateQueryStatement)
			: base(updateQueryStatement) {
			_update = updateQueryStatement;
		
		}

		public DbTableView UpdateTable {
			get { return Statement.Root; }
		}

		public List<KeyValuePair<DbColumnView, object >> NewCoumnValues {
			get { return _update.NewCoumnValues; }
		}
		
		public IEnumerable<JoinStatement> Joins {
			get {
				return Statement.Joints;
			}
		}
	}
}
